﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcDemo.Models;

namespace MvcDemo.Controllers
{
    public class HomeController : Controller
    {
        // GET: Home
        public ActionResult Index()
        {
            //2.选择模型，并指挥它干活  
            var welcomeModel = new WelcomeModel { Greeting="hello world!"};
            //此处省略1万行
            //3.1选择视图Index，3.2将welcomeModel模型传给视图，
            return View("Index",welcomeModel);
        }
    }
}